<template>
  <div>
    <van-row class="goods-nav">
      <van-col span="21">
        <van-tabs @click="goodsNavClick">
          <van-tab v-for="(item,key) in 10" title="电子烟" :key="key">
          </van-tab>
        </van-tabs>
      </van-col>
      <van-col span="3">
        <div class="icon-label-box tc">
          <van-icon name="more-o" />
        </div>
      </van-col>
    </van-row>
    
    <appmap></appmap>
    <van-notice-bar mode="closeable">
      更多优惠活动信息，请到店咨询！
    </van-notice-bar>
    <shoplist :data="shoplist"></shoplist>
  </div>
</template>

<script>
import { Row, Col, Icon, Cell, CellGroup,Search,Tabs,Tab,NoticeBar} from 'vant';
import appmap from './map/index';
import shoplist from './shop/list';
import * as shop from 'api/shop'
export default {
  name:'APPmain',
  components: {
    [Row.name]: Row,
    [Search.name]: Search,
    [Col.name]: Col,
    [Icon.name]: Icon,
    [Cell.name]: Cell,
    [CellGroup.name]: CellGroup,
    [Tabs.name]: Tabs,
    [Tab.name]: Tab,
    [NoticeBar.name]: NoticeBar,
    appmap,
    shoplist
  },
  data () {
    return {
      shoplist:[],
      searchVal:'',
      msg: 'Hello World!',
      shopType:[{'name':'电子烟'},{'name':'电子烟'},{'name':'电子烟'},{'name':'电子烟'},{'name':'电子烟'}],
    }
  },
  methods:{
    goodsNavClick(index){
      this.$router.push('/goodslist')
    },
    onCancel(){},
    getShopList(){
      shop.getShopList().then(data=>{
        this.shoplist=data.obj
      })
    }

  },
  mounted(){
    this.getShopList();
  }
}
</script>

<style lang="less">
// .goods-nav{background-color:#38244d;color:#fff100}
.icon-label-box{
  .van-icon{font-size:20px;margin-top:10px;}
}
</style>
